*---------------------------------------------------------------------------------------------------*
Re-order Heterogeneity Surfaces
Author: Gavin Henry Graham
Date: 11/01/2014

This is a research code and it is hoped that it will be useful. However, the author does not accept 
any responsibility to anyone for the consequences of using the code.
*---------------------------------------------------------------------------------------------------*

Copyright Declaration

The copyright of the code "Re-order Heterogeneity Surfaces" rests with the author and is made available 
under a Creative Commons Attribution Non-Commercial No Derivatives licence. Researchers are free 
to copy, distribute or transmit the code on the condition that they attribute it, that they do not 
use it for commercial purposes and that they do not alter, transform or build upon it. For any reuse 
or redistribution, researchers must make clear to others the licence terms of this work.

*---------------------------------------------------------------------------------------------------*

Code Description

Roxar's RMS uses a stratigraphic approach to gridding, where the youngest surface is specified at the top
of the sequence through to the oldest surface at the base of the sequence. This means that layer number 1
is at the top of the grid, which is logical. However, in the clinoform modelling algorithm, surface n is 
the oldest surface and surface n+1 is the youngest. We want to go on and translate the Heterogeneity 
Surface into a transmissibility multiplier grid property. In order to achieve this we re-order the 
Heterogeneity Surfaces generated by the clinoform-modelling algorithm, so that the youngest is
numbered 1 and the oldest is numbered n.

Inputs: 
	
	1. The number of Heterogeneity surfaces
	
	2. Unmodified Heterogeneity surfaces that have been generated by the clinoform modelling 
	   algorithm
	
	3. The file path where the Heterogeneity surfaces can be found
	   (e.g. C:\Users\Imperial\Desktop\ )
	
	4. The file path where the Heterogeneity surfaces are to be exported
           (e.g. C:\Users\Imperial\Desktop\outputs )

Outputs:

	1. Heterogeneity surfaces in zmap+ file format that have been re-ordered, for use in the 
	   Transmissibility Multiplier Property Generation algorithm